import http from '@/service/http'
import * as T from './types'

export const userApi: T.IUserApi = {
  login(params) {
    return http.post(
      '/langchainServer/api/langchain/usercenter/v1/login',
      params
    )
  },
  getUsersList() {
    return http.post(
      '/langchainServer/api/langchain/usercenter/v1/admin/get-users'
    )
  },
  addUser(params) {
    return http.post(
      '/langchainServer/api/langchain/usercenter/v1/admin/add-user',
      params
    )
  },
  deleteUser(params) {
    return http.post(
      '/langchainServer/api/langchain/usercenter/v1/admin/del-user',
      params
    )
  },
  editUser(params) {
    return http.post(
      '/langchainServer/api/langchain/usercenter/v1/admin/edit-user',
      params
    )
  },
  logout() {
    return http.post('/langchainServer/api/langchain/usercenter/v1/logout')
  }
}
